<template>
  <div>
    <q-btn flat
           color="primary"
           @click.stop="show = true"
           class="table-flat-btn"
    >
      更多>
    </q-btn>
    <basic-dialog :visible="show"
                  minWidth="400px"
                  :title="title"
                  :isFullScreen="false"
                  isShowClose
                  @close="show = false">
      <div style="padding: 10px 20px">
        <div v-for="(item, i) in dataList" :key="i" class="product-item font-14 flex items-center">
          <div>{{i + 1}}、</div>
          <td-spec :rowData="item"/>
        </div>
      </div>
    </basic-dialog>
  </div>
</template>

<script>
export default {
  name: 'detail-list',
  props: {
    title: {
      default: '产品规格'
    },
    dataList: {
      default: []
    },
    isCombinedWorkOrder: {
      default: false
    },
    isSpec: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      show: false
    }
  },
  methods: {
    showDialog () {
      this.show = true
    },
    getLabel (val) {
      return this.$utils.label(val)
    }
  }
}
</script>

<style scoped lang="stylus">
  .product-item{
    padding 10px 0
    color #333
  }
  //.table-flat-btn{
  //  padding 2px !important
    >>>.q-focus-helper{
      height: 25px !important;
      top: 0 !important;
      width: 36px !important;
      left: 1px;
    }
    >>>.q-btn{
      padding 0 !important
      font-size 14px
      margin-top 2px !important
    }
  //}
  .table-flat-btn{
    height 24px !important
    min-height 24px !important
    margin-top 0 !important
  }
</style>
